
<div id="content">
  <div class="container-fluid"><hr>
    <div class="row-fluid">
      <div class="span12">
        <div class="widget-box">
          <div class="widget-title"> <span class="icon"> <i class="icon-info-sign"></i></span>
            <h5>x修改商品</h5>
          </div>
          <div class="widget-content nopadding">
            <form class="form-horizontal" method="post" action="{:U('Business/updataGoods/id/'.$data['id'])}" name="basic_validate" id="basic_validate" novalidate="novalidate" enctype="multipart/form-data">

                <div class="control-group">
                    <label class="control-label">商品名称</label>
                    <div class="controls">
                        <input type="text" name="name" id="name" value="{$data.name}">
                    </div>
                </div>

                <div class="control-group">
                    <label class="control-label">本店售价</label>
                    <div class="controls">
                        <input type="text" name="shop_price" id="shop_price" value="{$data.shop_price}">
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">详细描述</label>
                    <div class="controls">
                        <textarea rows="3" cols="5" name="desc">{$data.desc}</textarea>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">缩略图</label>
                    <div class="controls">
                        <input type="file" capture="camera" accept="image/*"  name="thumb" id="thumb">
                    </div>
                    <label class="control-label">已上传的缩略图</label>
                    <div class="controls">
                        <img src="__UPLOAD__seller/thumb/{$data.thumb}" width="100" height="100"/>
                    </div>
                </div>
              <div class="form-actions">
                <input type="submit" value="submit" class="btn btn-success">
              </div>
            </form>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

<script>
    function judge()
    {
        if($("#name").val()=="")
        {
            alert("商品名称不能为空");
            $("#name").focus();
            return false;
        }
        else if($("#name").val().length>60)
        {
            alert("商品名称不能大于60");
            $("#name").focus();
            return false;
        }
        else if($("#shop_price").val()=="")
        {
            alert("商品价格不能为空");
            $("#shop_price").focus();
            return false;
        }
        else if(!/^[0-9]*$/.test($("#shop_price").val()))
        {
            alert("价格格式不正确");
            $("#shop_price").focus();
            return false;
        }
    }
</script>

<!--Footer-part-->
<div class="row-fluid">
    <div id="footer" class="span12"> 2013 &copy; Matrix Admin. More Templates <a href="http://www.cssmoban.com/" target="_blank" title="模板之家">模板之家</a> - Collect from <a href="http://www.cssmoban.com/" title="网页模板" target="_blank">网页模板</a> </div>
</div>
<!--end-Footer-part-->

<script src="__PUBLIC__js/matrix.form_common.js"></script>
<script src="__PUBLIC__js/jquery.ui.custom.js"></script>
<script src="__PUBLIC__js/bootstrap.min.js"></script>
<script src="__PUBLIC__js/bootstrap-colorpicker.js"></script>
<script src="__PUBLIC__js/bootstrap-datepicker.js"></script>
<script src="__PUBLIC__js/jquery.toggle.buttons.html"></script>
<script src="__PUBLIC__js/masked.js"></script>
<script src="__PUBLIC__js/jquery.uniform.js"></script>
<script src="__PUBLIC__js/select2.min.js"></script>
<script src="__PUBLIC__js/matrix.js"></script>
<script src="__PUBLIC__js/wysihtml5-0.3.0.js"></script>
<script src="__PUBLIC__js/jquery.peity.min.js"></script>
<script src="__PUBLIC__js/bootstrap-wysihtml5.js"></script>
<script src="__PUBLIC__js/jquery.dataTables.min.js"></script>
<script src="__PUBLIC__js/yanGradyJS/yanGrady.js"></script>
<script>
    $('.textarea_editor').wysihtml5();
</script>
</body>
</html>